package cn.iocoder.yudao.module.asasc.service.campaign;

import cn.iocoder.yudao.module.asasc.controller.admin.openapi.vo.CampaignUnionRespVO;
import cn.iocoder.yudao.module.asasc.dal.dataobject.campaign.AsaAppConfigDO;

import java.util.Map;

public interface CampaignDataApiService {
    /**
     * 按天获取广告系列的数据
     * <p>
     * POST https://api.searchads.apple.com/api/v4/reports/campaigns
     * Authorization: Bearer eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIiwia2lkIjpudWxsfQ..YAplG1yKbqWIdD1p.qpKORaP7W5_--FsS_3BaDkfxbljUvmzV6HEVRmrj1dPRTP-yew_qiUMJADeqWm5Vh2T_kuUaDFr_MGwldfM6ZnZkOKpdt6lxTpsZ4e7Pid2c-QOFgQMAkTXoIrCsUgj2t4VJXuCW3mXGSnx-S-xNPYWPYRSWtRItq2H6Cm1OH7JgVauUDpCR7xFwB44XPqZG6ofmjsjx6TBRU1QzMkWqSkIhYRuYIKHiMmgWw-hQX31bfnwKrrmQcSuIs62t9ni3m55aFQVEd0muNCP7ucucfGU._PMnzvxwybWbEu8CAo906Q
     * X-AP-Context: orgId=8045850
     * Content-Type: application/json
     */
    CampaignUnionRespVO getDailyCampaigns(AsaAppConfigDO configDO, String strDate, String endDate);

    /**
     * 处理 nodejs 抓取的 ASA 广告系列数据：解析>入库
     *
     * @param body ASA 原始接口返回的数据
     * @return
     */
    Map<String, Object> postDailyCampaigns(String body);
}
